# include"smg.h"
# include "delay.h"
/**
 * 数码管
 * @param pos 
 * @param num 
 */
void smg_show(unsigned int pos,unsigned int num){
    switch (pos) {
        case 0: LSC=1;LSB=1;LSA=1;break;
        case 1: LSC=1;LSB=1;LSA=0;break;
        case 2: LSC=1;LSB=0;LSA=1;break;
        case 3: LSC=1;LSB=0;LSA=0;break;
        case 4: LSC=0;LSB=1;LSA=1;break;
        case 5: LSC=0;LSB=1;LSA=0;break;
        case 6: LSC=0;LSB=0;LSA=1;break;
        case 7: LSC=0;LSB=0;LSA=0;break;
    }
    P0= smgcode[num];
    delay_ms(1);
    P0=0x00;
}